from typing import *
from math import inf


class Solution:
    def minimumAverage(self, nums: List[int]) -> float:
        ans = inf
        nums.sort()
        for i in range(len(nums) // 2):
            ans = min(ans, (nums[i] + nums[len(nums) - 1 - i]) / 2)
        return ans
